home *** CD-ROM | disk | FTP | other *** search
- Path: peer-news.britain.eu.net!demon!xetius.demon.co.uk
- From: chris@xetius.demon.co.uk (Chris Hudson)
- Newsgroups: comp.lang.c++
- Subject: Re: Graphics with Borland Turbo c++ 4.5?
- Date: Sat, 03 Feb 1996 00:18:51 GMT
- Message-ID: <823306694.29004@xetius.demon.co.uk>
- References: <31129FB3.2F0A@gatekeeper.vic.com>
- NNTP-Posting-Host: xetius.demon.co.uk
- X-NNTP-Posting-Host: xetius.demon.co.uk
- X-Newsreader: Forte Free Agent 1.0.82
-
- Jonathan Driscoll <jd@gatekeeper.vic.com> wrote:
-
- >I've been learning c++ from a disk tutorial I got, and it worked
- >well until I got to the graphics section. Apparently, that whole
- >section is rather worthless, for it assumes you're using dos. When I
-
- >#include <graphics.h>
-
- >the compler gives me the error that BGI doesn't work under windows. I'm
- >rather new to c++, but from what I understand, certain functions
- >(specifically, graphics functions) aren't the same for all c++
- >compilers, and I have to use graphics functions specific to the Borland
- >Turbo c++ compiler. This brings up two problems.
- > First, I got into c++ programming because it was supposed to be
- >a new and emerging standard in programming languages. But how standard
- >can a language be if programs are specific to the brand of compiler
- >used? It's all rather disillusioning for a beginning progammer...
- > Second, and more importantantly, I have no idea how to use the
- >damn thing. Although I commend Borland for their extensive use of
- >online help, it's really no help at all. I would really appreciate if
- >someone would post a simple (really, really simple) program that does
- >something like set the background color and draw a rectangle.
- > Thanks for the help,
-
- > Jonathan Driscoll (jd@vic.com)
-
- As windows is a graphical operating system it is bound to have a large
- number of specific functions for producing graphics, and also
- isolating these graphics from the user. To produce graphics in DOS is
- quite simple (Using the BGI libraries), you simply initialise the
- graphics driver, and tell it what you want to do. Within windows it
- is also relatively simple (Once you have everything setup within the
- Application), you simply write everything to the DC (Device context).
- But this in itself is an integral part of windows, so its best to
- learn windows programming using C++.
-
- C++ Is highly standardised, but things like BGI libraries, simply by
- their name are not standardised (Borland Graphical Interface), and
- some things like this will be different for each compiler. As of yet,
- there is not a standardised set of libraries for windows programming,
- as you have Microsoft with their MFC libs, and Borland with their OWL
- libs, so noone has yet devised a standard set of libs, but its getting
- their (My money is on Microsoft).
-
- Do the BGI libraries not work if you compile a DOS application, and
- run it under a DOS session in windows. I used to do some work like
- this, and once you get used to it, it can be quite effective.
-
- Hope this helps
-
- Chris (chris@xetius.demon.co.uk)
-
-